<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <div id="box"></div>
    <script src="./lib/jquery.js"></script>
    <script>
        var userMsg = {
            name: '王五',
            age: 16,
            sex: 'man',
        };
        //通过字符串拼接的方式进行渲染：把数据拼接到标签中
        var str =
            '<div><div>姓名：' +
            userMsg.name +
            '</div><div>年龄：' +
            userMsg.age +
            '</div><div>性别：' +
            userMsg.sex +
            '</div></div>';
        $('#box').html(str);
    </script>
</body>

</html>